package com.yitong.equipment.entity.other

import android.os.Parcel
import android.os.Parcelable

class CategoryOneArrayBean() : Parcelable{
    var name: String? = null
    var imgsrc: String? = null
    var cacode: String? = null
    var categoryTwoArray: List<CategoryTwoArrayBean>? = null

    constructor(parcel: Parcel) : this() {
        name = parcel.readString()
        imgsrc = parcel.readString()
        cacode = parcel.readString()
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(name)
        parcel.writeString(imgsrc)
        parcel.writeString(cacode)
    }

    override fun describeContents(): Int {
        return 0
    }

    override fun toString(): String {
        return "CategoryOneArrayBean(name=$name, imgsrc=$imgsrc, cacode=$cacode, categoryTwoArray=$categoryTwoArray)"
    }

    companion object CREATOR : Parcelable.Creator<CategoryOneArrayBean> {
        override fun createFromParcel(parcel: Parcel): CategoryOneArrayBean {
            return CategoryOneArrayBean(parcel)
        }

        override fun newArray(size: Int): Array<CategoryOneArrayBean?> {
            return arrayOfNulls(size)
        }
    }


}